package com.foruo.learn.designmode.interpret;

/**
 * 数字解释器（具体值） TerminalExpression
 * @author GaoYuan
 * @date 2018/11/11 上午8:44
 */
public class ValueExpression extends Expression {

    private int value;

    public ValueExpression(){}

    public ValueExpression(int value){
        this.value = value;
    }

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    @Override
    public int interpret() {
        return this.value;
    }
}
